package com.kk.quyan.entity;

import ch.qos.logback.core.pattern.ConverterUtil;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.converters.string.StringImageConverter;
import com.alibaba.excel.util.ConverterUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 素材表
 * </p>
 *
 * @author kk
 * @since 2020-11-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Material对象", description="素材表")
public class Material implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @ExcelProperty(value = "素材id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "素材名称")
    @ExcelProperty(value = "素材名称")
    private String title;

    @ApiModelProperty(value = "素材类型 0视频 1表情包 2写真")
    @ExcelProperty(value = "素材类型")
    //用于优化查询
    private Integer type;

    @ApiModelProperty(value = "素材链接")
    @ExcelProperty(value = "素材链接")
    private String url;

    @ApiModelProperty(value = "素材得分，排行榜")
    @ExcelProperty(value = "素材得分")
    private Integer score;

    @ApiModelProperty(value = "素材描述")
    @ExcelProperty(value = "素材描述")
    private String description;

    @ApiModelProperty(value = "逻辑删除,1表示删除,0表示未删除")
    @TableLogic
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")
    private Date updateTime;
}
